cmake_minimum_required(VERSION 3.14)
project(heguodong_study)

# GoogleTest requires at least C++14
set(CMAKE_CXX_STANDARD 14)

include(FetchContent)
FetchContent_Declare(
  googletest
  URL https://github.com/google/googletest/archive/3026483ae575e2de942db5e760cf95e973308dd5.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

#message(WARNING:"1111111111111111111111111111111111111111112222222222222222222222221111111")
#MESSAGE( STATUS "PCL_FOUND = ${CMAKE_HOST_SYSTEM_PROCESSOR}.")
#message(WARNING:"1111111111111111111111111111111111111111112222222222222222222222221111111")
include_directories ("${PROJECT_BINARY_DIR}/_deps/googletest-src/googlemock/include")
include_directories ("${PROJECT_BINARY_DIR}/_deps/googletest-src/googletest/include")

enable_testing()

add_executable(
	test_funcs
	funcs.cpp	
	test_funcs.cpp
)
target_link_libraries(
	test_funcs
	gmock
	GTest::gtest_main
)

include(GoogleTest)
gtest_discover_tests(test_funcs)

